/* stylelint-disable no-duplicate-selectors */

/* Ant Design Vue 全局样式配置 */

@primary-color: #297eee;
@bg-color: #fff;

// 切换深色模式时的过渡效果
.ant-menu,
.ant-table-thead > tr > th {
  transition: background 0s, width 0.3s cubic-bezier(0.2, 0, 0, 1) 0s !important;
}

.ant-tree,
.ant-table {
  .ant-btn {
    padding: 0.25rem;
    font-size: 0.875rem;
    color: @primary-color;
    font-weight: 400;

    &:hover {
      background-color: none;
    }
  }

  .ant-tree-node-selected,
  .ant-table-cell-row-hover {
    .common-text-button {
      color: #143b92;
    }

    .del-text-button {
      color: #ff3030;
    }
  }
}

.ant-select-tree {
  &-node-content-wrapper {
    text-align: left;
  }

  &-switcher_close {
    color: #ccc;
  }

  &-switcher_open {
    color: #666;
  }
}

.search {
  width: 2.875rem !important;
}

.ant-form-item-explain-error {
  width: 17.5rem;
  text-align: left;
}


// /deep/.ant-pagination.ant-select-selector {
//   height: 1.875rem !important;
//   line-height: 1.875rem !important;
//   background-color: red !important;

//   .ant-select-selection-item {
//     line-height: 1.875rem !important;
//   }
// }
.ant-pagination {
  .ant-select-selector {
    .ant-select-selection-item {
      color: #707479;
    }

    &:hover,
    &:focus {
      background: rgb(0 121 106 / 10%);

      span,
      a {
        color: #00796a ;
      }
    }
  }
}

.ant-pagination-item-link,
.ant-pagination-item {
  width: 2rem;
  height: 2rem;
  background: transparent;

  span,
  a {
    color: #707479;
  }
}

.ant-pagination-item-link:hover,
.ant-pagination-item:hover {
  background: rgb(0 121 106 / 10%);
  border-color: rgb(0 121 106 / 10%);

  span,
  a {
    color: #00796a ;
  }
}

.ant-pagination-item-active {
  background: rgb(0 121 106 / 10%);
  border-color: rgb(0 121 106 / 10%);

  span,
  a {
    color: #00796a;
  }
}

.ant-pagination-item-active:hover {
  background: rgb(0 121 106 / 10%);
  border-color: rgb(0 121 106 / 10%);

  span,
  a {
    color: #00796a;
  }
}

.ant-tree-select {
  .ant-select-tree-title,
  .ant-select-selection-item {
    .ellipsis-label {
      overflow: hidden;
      width: 8rem;
      text-overflow: ellipsis;
      white-space: nowrap;
      word-break: break-all;
    }
  }

  .ant-select-selection-item {
    .ellipsis-label {
      width: 9rem;
    }
  }

  // 缩进
  .ant-select-tree-indent-unit {
    width: 0.5rem;
  }
}

.ant-select-tree-treenode.ant-select-tree-treenode-disabled {
  .ant-select-tree-title {
    color: #bfbfbf !important;
  }
}

.ant-image-preview-img {
  display: inline-block;
}

.ant-input-affix-wrapper,
.ant-select,
.ant-picker,
.ant-select-selector {
  height: 2rem !important;
}


.ant-select {
  .ant-select-clear {
    transform: translateY(-50%);
    margin-top: -0.175rem;
  }
}

// .ant-select-single,
// .ant-select-selector,
// .ant-select-selection-item,
// .ant-select-single,
// .ant-select-selector,
// .ant-select-selection-placeholder {
//   line-height: 2rem !important;
// }

// .ant-picker {
//   input {
//     text-align: center;
//   }
// }

// .ant-menu-vertical .ant-menu-item::after,
// .ant-menu-vertical-left .ant-menu-item::after,
// .ant-menu-vertical-right .ant-menu-item::after,
// .ant-menu-inline .ant-menu-item::after {
//   top: 0 !important;
//   height: 2.875rem !important;
// }

.ant-radio-wrapper {
  color: #707479;
  font-weight: 400;
}

.ant-radio-wrapper-checked {
  color: #000;
}

.ant-pagination-disabled .ant-pagination-item-link,
.ant-pagination-disabled:hover .ant-pagination-item-link {
  span {
    color: #ccc;
  }
}

/* stylelint-disable-next-line selector-no-vendor-prefix */
input.ant-select-selection-search-input::-webkit-input-placeholder {
  color: #000;
}

.ant-form-item-label {
  max-width: 100%;
}

.ant-modal-confirm-btns {
  .ant-btn {
    line-height: 1.5rem;
  }
}

.ant-checkbox-group-item {
  margin-right: 0;
}

.label-image-modal {
  height: 85%;

  .ant-modal-content {
    overflow-y: auto;
    height: 100%;
  }
}
